package com.stadium.bean;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

//赛事实体类
@Entity
@Table(name = "matchs")
public class Match {

	private int id;
	private String matchName;// 赛事名称
	private Integer status = 0;// 状态0:审核中 状态1：已审核 2：已完成
	private String borrowAccount;
	private String borrowName;// 租借人名字
	private String orderTime;// 订单时间
	private String startTime;// 起始时间
	private String endTime;// 结束时间
	private String telephone; // 联系方式
	private Integer placesId;// 场地id
	private Integer orderId;// 器材订单id
	private Integer number;// 器材数量
	private Integer equipId;// 器材id
	private Integer placeOrderId;// 场地订单id
	private PlaceOrder places;
	private Order orders;
	private Equipment equipment;
	private Place place;
 
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getMatchName() {
		return matchName;
	}

	public void setMatchName(String matchName) {
		this.matchName = matchName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getBorrowAccount() {
		return borrowAccount;
	}

	public void setBorrowAccount(String borrowAccount) {
		this.borrowAccount = borrowAccount;
	}

	public String getBorrowName() {
		return borrowName;
	}

	public void setBorrowName(String borrowName) {
		this.borrowName = borrowName;
	}

	public String getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Integer getEquipId() {
		return equipId;
	}

	public void setEquipId(Integer equipId) {
		this.equipId = equipId;
	}

	public Integer getPlaceOrderId() {
		return placeOrderId;
	}

	public void setPlaceOrderId(Integer placeOrderId) {
		this.placeOrderId = placeOrderId;
	}

	@Transient
	public PlaceOrder getPlaces() {
		return places;
	}

	public void setPlaces(PlaceOrder places) {
		this.places = places;
	}

	@Transient
	public Equipment getEquipment() {
		return equipment;
	}

	public void setEquipment(Equipment equipment) {
		this.equipment = equipment;
	}

	@Transient
	public Place getPlace() {
		return place;
	}

	public void setPlace(Place place) {
		this.place = place;
	}

	public Integer getPlacesId() {
		return placesId;
	}

	public void setPlacesId(Integer placesId) {
		this.placesId = placesId;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Transient
	public Order getOrders() {
		return orders;
	}

	public void setOrders(Order orders) {
		this.orders = orders;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public Match(int id, String matchName, Integer status, Integer userId, String borrowName, String orderTime,
			String startTime, List<PlaceOrder> places, List<Order> orders) {
		super();
		this.id = id;
		this.matchName = matchName;
		this.status = status;
		this.borrowName = borrowName;
		this.orderTime = orderTime;
		this.startTime = startTime;
	}

	
	
	@Override
	public String toString() {
		return "Match [id=" + id + ", matchName=" + matchName + ", status="
				+ status + ", borrowAccount=" + borrowAccount + ", borrowName="
				+ borrowName + ", orderTime=" + orderTime + ", startTime="
				+ startTime + ", endTime=" + endTime + ", telephone="
				+ telephone + ", placesId=" + placesId + ", orderId=" + orderId
				+ ", number=" + number + ", equipId=" + equipId
				+ ", placeOrderId=" + placeOrderId + ", places=" + places
				+ ", orders=" + orders + ", equipment=" + equipment
				+ ", place=" + place + "]";
	}

	public Match() {
		super();
	}

}
